import { createStore } from 'vuex'
import createPersistedState from 'vuex-persistedstate'

export default createStore({
  state: {//定义数据
    token:0
  },
  mutations: {
    setToken(state,t){//修改
      state.token=t;
    },
    setTopicId(state,id){
      state.topicId=id;
    },
    setRemarkId(state,id){
      state.remarkId=id;
    },
  },
  plugins: [createPersistedState()]
})